package com.ftg.learn.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.Map;
import java.util.Objects;

/**
 * @author kangjx
 * @createTime 2022/9/13
 */
@RestController
public class RemoteController {

    @Autowired
    RestTemplate restTemplate;

    @GetMapping("/showTeacherWithnacos-mybatisplus2")
    public Object abc(){
        String url = "http://localhost:9091/teacher";
        return restTemplate.getForObject(url, Map.class);
    }

}
